package com.example.spring_boot.bean;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Component
public class DogCompent {
   @Bean(name = "dog")
    public Dog dog(){
        Dog dog=new Dog();
        System.out.println(dog.getName());
        return dog;
    }

}
